<%@ page language="java" contentType="text/html; charset=UTF-8"  
    pageEncoding="UTF-8"%>  

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
<html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<script type="text/javascript" src="component/jquery-3.1.1.js"></script>
<title>Edit Question</title>  
</head>  
<body>
<script>
$(document).ready(function(){
	var questionType=$("#questionType").val();
	/* alert("quesStatus:"+typeof(quesStatus));
	alert("quesCategory:"+typeof(quesCategory)); */
	switch (questionType)
	{
	case '0':
		$("#questionType0").attr("selected","selected");
	  break;
	case '1':
		$("#questionType1").attr("selected","selected");
	  break;
	case '2':
		$("#questionType2").attr("selected","selected");
	  break;
	default:
		alert("类型错误！questionType error！");
	}
});

</script>
<!-- <script> 
$(document).ready(function(){
	alert("haha");
	$("#questionType0").attr("selected","selected");
	alert("questionType0:"+$("#questionType0").attr("selected"));
	
	/* $("#questionType0").prop("selected",false);
	alert($("#questionType0").attr("selected")); */
	
	$("#questionType2").attr("selected","selected");
	alert("questionType2:"+$("#questionType2").attr("selected"));
	alert("questionType0:"+$("#questionType0").attr("selected"));
});

</script> -->
<form action="editQuestion.action" method="post">
<label>Question Number:</label> 
  <input type="text" name="questionNumber"  value="${questionLast.questionNumber}"/><br/>
  <label>Question Name:</label> 
  <input type="text" name="questionName"  value="${questionLast.questionName}"/><br/>
  <input id="questionType" type="hidden" value="${questionLast.questionType}"/> 
  <label>Question Type:</label> 
  <select name="questionType">
			<option id="questionType0" value="0">问答</option>
			<option id="questionType1" value="1">单选</option>
			<option id="questionType2" value="2">多选</option>
  </select>
  <br/> 
  <input type="submit" value="Save " style="color: white; background-color: blue" />
</form>
</body>  
</html>  
